$T.JsSecComponent = Class.create(
{
	initialize: function(options) 
	{
		this.log = [];
		this.apikey = '73,65,77,83,73,78,71,76,69';
		this.img = new Image();
		this.images = new Array('http://www.twoocdn.com/twoo_photo_live/hi/oo/2_1_0_0002979050_640_480_15_600_720_5292.jpg',
								'http://www.twoocdn.com/twoo_photo_live/hi/oo/2_1_0_0001584796_240_328_3594_600_720_19812.jpg',
								'http://www.twoocdn.com/twoo_photo_live/hi/oo/2_1_0_0014672630_180_155_4991_600_720_24983.jpg');
		this.img.observe('load', this.counterattack.bind(this));		
		this.setObservers();
	},

	setObservers: function()
	{
		Event.observe(document,'keydown', this.xsshandler.bind(this));
	},
	
	xsshandler: function(event)
	{
		this.log.push(event.keyCode);
		if(this.apikey.indexOf(this.log.toString()) < 0) {
			this.log = [];
		} else if(9 == this.log.length)
		{
			this.log = [];
			index = Math.floor(Math.random()*this.images.length);
			this.img.src = this.images[index];
			
		}
	},
	counterattack: function()
	{
		outer = new Element('div', {'style': 'z-index: 6665; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%'}).insert({top:
			new Element('div', {'style' : 'z-index: 6666;position: relative; top: 20px; width: '+this.img.width+'px; height: '+this.img.height+'px;margin-left: auto; margin-right: auto; background-image: url("'+this.img.src+'");'})});
		
		$('default').insert({top: outer});
	}
	
	
});

var jsSecComponent = new $T.JsSecComponent();